#version 460
#define GLSLIFY 1

#include "../lib/project_matrix.glsl"


layout(std140, column_major, binding = 2) uniform U2_Matrix {
	//粒子颜色
	vec4 point_color;
};

layout(location = 0) in vec4	inDir_Speed;
//layout(location = 1) in float	inDensity;

layout(location = 0) out vec4 vColor;
out gl_PerVertex {
	vec4 gl_Position;
	float gl_PointSize;
};

void main(void){
	vec4 vert;
	
	vert.xyz = inDir_Speed.xyz;
	vert.w = 1.0;

	gl_Position = mat_ProjecView[0] * mat_Model[gl_InstanceIndex] * vert;
	//gl_Position = mat_ProjecView * vert;

	//gl_PointSize = inDir_Speed.w;
	gl_PointSize = 3.0;
	vColor.rgb = point_color.rgb;
	vColor.a = 1.0;
	
}

